// imports all file except index.js
const req = require.context('.', true, /^(?!.\/index)(?!.\/__tests__).*.js$/);

const Modules = {};

req.keys().forEach(key => {
    const regex = /.\/(.*?).js$/;
    const moduleName = regex.test(key) && key.match(regex)[1];
    Modules[moduleName] = req(key).default;
});

export default Modules;
